<template>
	<view>
		<new-list :userid="index" v-for="(index,item) in usermessage" :key="index"></new-list>
	</view>
</template>

<script>
	import newList from "@/components/newList.vue"
	export default {
		components:{
			newList
		},
		
		data() {
			return {
				isLogin:false,
				usermessage:[1,2,3]
			}
		},

		created() {

		},
		
		onShow() {
			if (getApp().globalData.user._id) {
				this.isLogin = true
				this.usermessage = getApp().globalData.message
				
			} else{
				uni.showToast({
					title: "请先登录！",
					duration: 2000,
					icon: 'none',
					success() {
						setTimeout( ()=> {
							uni.switchTab({
								url: '/pages/user/user'
							})
						}, 2000)
				
					}
				})
			}
		},

		methods: {
			


			
		
	}


	}
</script>

<style>

</style>
